package com.iwhalecloud.citybrain.flow.platform.manager.application.common.threadlocal;

import com.iwhalecloud.citybrain.flow.platform.manager.domain.model.User;

/**
 * @author lilh
 * @date 2021/1/7 上午10:47
 */
public class StartUserHolder {

    private static ThreadLocal<User> user = new ThreadLocal<>();

    public static void setUser(User current) {
        user.set(current);
    }

    public static User getUser() {
        return user.get();
    }

    public static void remove() {
        user.remove();
    }
}
